import { ProblemAnswer } from '../common/problem';
import {
  AudioMessage,
  LessonEventMessage,
  TextMessage
} from './getMessageList';

export interface GetLessonsParams {
  courseId: number;
}

export interface GetRoundListParams {
  lessonResourceId: number;
  lessonId: number;
}

export interface GetRoomInfoParams {
  lessonId: number;
}

export interface SubmitAnswerParams {
  problemAnswer: ProblemAnswer;
  roundId: number;
  lessonId: number;
  useTime: number;
  isAbort: boolean;
}

export interface GetProblemParams {
  problemId: number;
  lessonId: number;
}

export interface LessonFinishedParams {
  lessonId: number;
}

export interface GetUserInfoParams {
  userId: string;
  lessonId: number;
  problemId: number;
}

export interface LeaveRoomParams {
  lessonId: number;
}
export interface DiscussFinishParams {
  lessonId: number;
  roundId: number;
}

export interface GetAgoraToken {
  channelName: string;
}

export interface DiscussStartParams {
  lessonId: number;
  roundId: number;
}

export interface UserProblemRoundProgressParams {
  lessonId: number;
  roundId: number;
  roundStatus: number;
}

export interface UserEnterNextRoundParams {
  lessonId: number;
  roundId: number;
}

export interface SubmitReplayAnswerParams {
  problemAnswer: ProblemAnswer;
  isAbort: boolean;
}

export interface LessonAssistStartTalkToAllParams {
  lessonId: number;
}

export interface LessonAssistStopTalkToAllParams {
  lessonId: number;
}

export interface GetLessonEndPageParams {
  lessonId: number;
}

export interface UploadUserInstantAnswerParams {
  lessonId: number;
  answer: string;
  instantAnswerId: number;
  roundId: number;
  useTime: number;
}

export interface UserEventReportParams {
  lessonId: number;
  type: number;
}

export interface SubmitReplayInstantParams {
  lessonId: number;
  instantAnswerId: number;
  answer: string;
}

export interface GetRoundListCacheInfoParams {
  lessonResourceId: number;
}

export interface LessonSignParams {
  lessonId: number;
}

export interface GetMessageListParams {
  friendId: number;
  lessonId: number;
}

export interface ReadMessageParams {
  messageId: number;
  lessonId: number;
}

export interface SendMessageParams {
  receiverId: number; // 接收人ID
  type: number; // 消息类型 1-文字，2-语音，3-跟课事件
  lessonId: number; // 课ID
  textMessage?: TextMessage; // 文字消息内容（若已撤回，接收人获取的消息内容为空）
  audioMessage?: AudioMessage; // 语音消息内容（若已撤回，接收人获取的消息内容为空）
  lessonEventMessage?: LessonEventMessage; // 跟课事件消息内容（若已撤回，接收人获取的消息内容为空）
}

export interface GetMessageRemindNumParams {
  lastSeeMessageId: number;
  lessonId: number;
  friendId: number;
}

export interface ReadTextMessagesParams {
  lessonId: number;
  friendId: number;
}

export interface GetPlatformStudentParams {
  lessonId: number;
  roundId: number;
}
